/*
 *登录注册模块路由
*/

//引入express模块
const express = require('express');
//创建路由对象
const router = express.Router();
//导入login路由处理模块
const loginHandler = require('../router_handle/login');
//导入expressjoi模块
const expressJoi = require('@escook/express-joi');
//导入验证规则对象
const { login_limit} = require('../limit/login');

//注册路由
router.post('/register', expressJoi(login_limit),loginHandler.register);
//登录路由
router.post('/login', expressJoi(login_limit),loginHandler.login);

//向外暴露路由
module.exports = router;